<?php
/******************************************************* *   Copyright (C) 2007  http://p3net.net    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License along    with this program; if not, write to the Free Software Foundation, Inc.,    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    
    @id: $Id: index.php 5 2007-07-26 23:43:48Z p3net.tech $
*********************************************************/
include('globals.php');
/* 5 most recent users should be enough. We can fill the rest with ads or something */
$_query = "SELECT `id`, `display_name`, `user_image` FROM `users` SORT BY `id` DESC LIMIT 5";
$res = ($db->query($_query);
while($user = $db->fetch_array($_query))
{
	$userdetail[$user['display_name']] = array(
		'id' => $user['id'],
		`icon` => $user['user_image']
	);
}
$index =& new template('home.tpl');
$index->set('userdetail', $userdetail);
?>